<?php
class Zend_View_Helper_DrawSelect extends Zend_View_Helper_Abstract
{
	public function Draw($Array,$Prefix = '')
	{
		if (  count($Array)  ) 
		{
			echo "<style>.second{ color:#333;}.third{color:#777;}</style>";
			echo "<select class='select-menu' name='menuselect'>";
			echo "<option class='first' value='0'>/</option>";
			foreach ($Array as $Value)
			{
				{
				    echo "<option class='first' value='{$Value['ID']}'>{$Value['Name']}</option>";	
				}
                if( isset($Value['sub']) && count($Value['sub']) ) 
                {
                    foreach ($Value['sub'] as $Value2)
                    {
	                    {
	                        echo "<option class='second' value='{$Value2['ID']}'>&nbsp;-&nbsp;{$Value2['Name']}</option>"; 
	                    }
	                    
	                    
		                if( isset($Value2['sub']) && count($Value2['sub']) ) 
		                {
		                    foreach ($Value2['sub'] as $Value3)
		                    {
		                        {
		                            echo "<option class='third' value='{$Value3['ID']}'>&nbsp;-&nbsp;-&nbsp;{$Value3['Name']}</option>"; 
		                        }
		                    }
		                }
	                    
	                    
	                    
	                    
                    }
                }
			}
			echo "</select>";
		}
	}
	
	
	
	public function drawSelect($Menu)
	{
       $this->Draw($Menu);
	}
}